package com.xxwy.protocal;

import java.nio.charset.Charset;
import java.util.Arrays;

/**
 * @author wy
 * @date 2020/3/8 23:49
 */
public class XxwyProtocol {
  private int len;
  private byte[] content;

  public XxwyProtocol() {
  }


  public XxwyProtocol(int len, byte[] content) {
    this.len = len;
    this.content = content;
  }

  public int getLen() {
    return len;
  }

  public void setLen(int len) {
    this.len = len;
  }

  public byte[] getContent() {
    return content;
  }

  public void setContent(byte[] content) {
    this.content = content;
  }

  @Override
  public String toString() {
    return "XxwyProtocol{" +
        "len=" + len +
        ", content=" + new String(content, Charset.forName("utf-8")) +
        '}';
  }
}
